from starlette.endpoints import HTTPEndpoint
from database import Session, engine
import datetime
from dao import DaoPendingProDet



class PendingProDet(HTTPEndpoint):

    async def get(self, request):
        session = Session()
        try:
           bureauid = request.query_params["bureauid"]
           stationid = request.query_params["stationid"]
           return  DaoPendingProDet.get_problem_list(session, bureauid, stationid)
        finally:
            session.close()